<div class="row-fluid">
	<div class="well">
		<form class="form-inline" method="post" action="jsp/admin/user/attribute/CreateAttribute.jsp">
			<fieldset>
				<div class="control-group">
					<label class="control-label" for="attribute_type_class_name">#i18n{portal.users.manage_attributes.addNewAttributes} :</label>
					<select id="attribute_type_class_name" name="attribute_type_class_name">
						<#list attribute_types_list as attribute_type>
							<option value="${attribute_type.className}">${attribute_type.name}</option>
						</#list>
					</select>
					<button class="btn btn-primary btn-small" type="submit" >
						<i class="icon-plus icon-white" ></i><span class="hidden-phone" >#i18n{portal.users.manage_attributes.buttonAdd}</span>
					</button>
				</div>
			</fieldset>
		</form>
	</div>
</div>

<div class="row-fluid">
	<fieldset>
		<legend>#i18n{portal.users.manage_attributes.pageTitle}</legend>
		<a name="list" id="list"></a>
		<table class="table table-striped table-condensed">
			<tr>
				<th>#i18n{portal.users.manage_attributes.columnTitle}</th>
				<th>#i18n{portal.users.manage_attributes.columnType}</th>
				<th>#i18n{portal.users.manage_attributes.columnOriginalComponent}</th>
				<th>#i18n{portal.users.manage_attributes.columnTitleActions}</th>
			</tr>
			<#assign cpt = 0>
			<#list attributes_list as attribute >
			<#assign cpt = cpt + 1>
			<tr>
				<td>${attribute.title}</td>
				<td>${attribute.attributeType.name}</td>
				<td>
					<#if attribute.plugin?exists && attribute.plugin.name?has_content>
					${attribute.plugin.name}
					<#else>
					#i18n{portal.users.manage_attributes.labelCore}
					</#if>
				</td>
				<td>
					<#if attribute.plugin?exists && attribute.plugin.name != "">
					<#if cpt != 1>
					<a class="btn btn-primary btn-small" href="jsp/admin/user/attribute/DoMoveUpAttribute.jsp?id_attribute=${attribute.idAttribute}#list"  title="#i18n{portal.users.modify_attribute.buttonLabelMoveUp}" >
						<i class="icon-chevron-up icon-white"></i>
					</a>

					</#if>
					<#if attribute_has_next>
					<a class="btn btn-primary btn-small" href="jsp/admin/user/attribute/DoMoveDownAttribute.jsp?id_attribute=${attribute.idAttribute}#list"  title="#i18n{portal.users.modify_attribute.buttonLabelMoveDown}" >
						<i class="icon-chevron-down icon-white"></i>
					</a>

					</#if>
					<#else>
					<a class="btn btn-primary btn-small" href="jsp/admin/user/attribute/ModifyAttribute.jsp?id_attribute=${attribute.idAttribute}"  title="#i18n{portal.users.manage_attributes.buttonLabelModify}" >
						<i class="icon-edit icon-white"></i>
					</a>

					<#if cpt != 1>
					<a class="btn btn-primary btn-small" href="jsp/admin/user/attribute/DoMoveUpAttribute.jsp?id_attribute=${attribute.idAttribute}#list"  title="#i18n{portal.users.modify_attribute.buttonLabelMoveUp}" >
						<i class="icon-chevron-up icon-white"></i>
					</a>

					</#if>
					<#if attribute_has_next>
					<a class="btn btn-primary btn-small" href="jsp/admin/user/attribute/DoMoveDownAttribute.jsp?id_attribute=${attribute.idAttribute}#list"  title="#i18n{portal.users.modify_attribute.buttonLabelMoveDown}" >
						<i class="icon-chevron-down icon-white"></i>
					</a>

					</#if>
					<a class="btn btn-danger btn-small" href="jsp/admin/user/attribute/RemoveAttribute.jsp?id_attribute=${attribute.idAttribute}"  title="#i18n{portal.users.manage_attributes.buttonLabelDelete}" >
						<i class="icon-trash icon-white"></i>
					</a>

					</#if>
				</td>
			</tr>
			</#list>
		</table>
	</fieldset>
</div>
